From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Fri, 16 Aug 2024 01:45:38 +0000 (-0600) Subject: add fix & test for humminbird route writer. (#1324) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2^2~66 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=6e319e82ea514b50a2747de5a34ac5449836d877;p=gpsbabel.git add fix & test for humminbird route writer. (#1324) The missing initialization was introduced in 824e01d. --- diff --git a/humminbird.cc b/humminbird.cc index 3d66cc058..f829cc796 100644 --- a/humminbird.cc +++ b/humminbird.cc @@ -805,7 +805,7 @@ HumminbirdFormat::humminbird_rte_head(const route_head* rte) { humrte = nullptr; if (!rte->rte_waypt_empty()) { - humrte = new humminbird_rte_t; + humrte = new humminbird_rte_t(); } } diff --git a/reference/route/humminbird_gpsbabel.hwr b/reference/route/humminbird_gpsbabel.hwr new file mode 100644 index 000000000..f2f5a2bba Binary files /dev/null and b/reference/route/humminbird_gpsbabel.hwr differ diff --git a/testo.d/humminbird.test b/testo.d/humminbird.test index 3604bc6bb..eb143863a 100644 --- a/testo.d/humminbird.test +++ b/testo.d/humminbird.test @@ -7,6 +7,21 @@ gpsbabel -i humminbird -f ${REFERENCE}/humminbird.hwr -o humminbird -F ${TMPDIR} bincompare ${REFERENCE}/humminbird.hwr ${TMPDIR}/humminbird.hwr gpsbabel -i humminbird -f ${REFERENCE}/route/humminbird.hwr -o gpx -F ${TMPDIR}/humminbird~hwr.gpx compare ${REFERENCE}/route/humminbird~hwr.gpx ${TMPDIR}/humminbird~hwr.gpx + +# The provenance of humminbird.hwr is unclear. +# The routes have timestamps +# 48 a8 59 72 (Sun Aug 17 2008 17:01:38 GMT+0000) +# 48 a8 5a 77 (Sun Aug 17 2008 17:05:59 GMT+0000) +# 48 a8 5a 80 (Sun Aug 17 2008 17:06:08 GMT+0000) +# which suggests they may be real. +# The unused entries in the points array of the route headers appear to be random. +# To add regresssion for our writer we generated a corresponding hwr file with GPSBABEL_FREEZE_TIME=y +# gpsbabel -i humminbird -f reference/route/humminbird.hwr -o humminbird -F reference/route/humminbird_gpsbabel.hwr +# This has zeroed timestamps and zeroed unused entries in the points arrays. +gpsbabel -i humminbird -f ${REFERENCE}/route/humminbird_gpsbabel.hwr -o humminbird -F ${TMPDIR}/humminbird_gpsbabel~hwr.hwr +compare ${REFERENCE}/route/humminbird_gpsbabel.hwr ${TMPDIR}/humminbird_gpsbabel~hwr.hwr + +# # # Humminbird tracks # @@ -27,3 +42,4 @@ compare ${REFERENCE}/humminbird-rte-v2~gpx.gpx ${TMPDIR}/humminbird-rte-v2~gpx.g gpsbabel -i humminbird -f ${REFERENCE}/humminbird-rte-v3.hwr -o gpx,humminbirdextensions=1 -F ${TMPDIR}/humminbird-rte-v3~gpx.gpx compare ${REFERENCE}/humminbird-rte-v3~gpx.gpx ${TMPDIR}/humminbird-rte-v3~gpx.gpx +